﻿/*==============================================================
 * MailServerMapping.cs
 * Copyright (C) 2014 贵州惠众互联 Inc. All rights reserved.
 *==============================================================
 * Author:   罗应红
 * Date:     2014/02/13 14:58:14.
 * Version:  1.0
 * QQ:		 88962800
*==============================================================*/


using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using QDT.Core.Domain;

namespace QDT.Core.MSData.Mapping {
    public class MailServerMapping:EntityTypeConfiguration<MailServer> {
        public MailServerMapping() {
            HasKey(o => o.ID);
            Property(o => o.ID).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity).HasColumnName("Id");
            Property(o => o.SmtpName).HasColumnName("smtp_name");
            Property(o => o.SmtpServer).HasColumnName("smtp_server");
            Property(o => o.SmtpPassword).HasColumnName("smtp_pwd");
            Property(o => o.IsSsl).HasColumnName("is_ssl");
            Property(o => o.SmtpPort).HasColumnName("smtp_port");
            Property(o => o.UseLimit).HasColumnName("use_limit");
            Property(o => o.IsReset).HasColumnName("is_reset");
            Property(o => o.IsEffect).HasColumnName("is_effect");
            Property(o => o.TotalUse).HasColumnName("total_use");
            Property(o => o.IsVerify).HasColumnName("is_verify");
            ToTable(DB.TPref("mail_server"));
        }
    }
}